/**
 * Copyright (c) 2005 - 2007 FeyaSoft Corp. All Rights Reserved.
 */
package com.feyaSoft.home.web.source;

import org.json.JSONObject;

/**
 * TODO Class or interface comments begin with a single descriptive sentence.
 * 
 * @author Fenqiang.Zhuang
 */
public class DirFile extends Fold
{
	private String leaf = "true";

	/** 
	 * Return the value of leaf 
	 * @return String - leaf. 
	 */
	public String getLeaf()
	{
		return leaf;
	}


	/** 
	 * Set the value of leaf
	 * @param File.java - String.
	 */
	public void setLeaf(String leaf)
	{
		this.leaf = leaf;
	}


	public JSONObject toJSONObject() throws Exception
	{
		JSONObject json = new JSONObject();
		json.put("text", this.text);
		json.put("id", this.id);
		json.put("cls", "file");
		json.put("leaf", this.leaf);

		return json;
	}
}
